package com.wootion.cims.module.map.controller;

import com.wootion.cims.module.map.dto.Condition;
import com.wootion.cims.module.map.service.HousingMapService;
import com.wootion.cims.response.ResponseResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @Author: LanQiang
 * @Date: 2023/01/05/13:55
 * @Description: 住房统计
 */
@RestController
@RequestMapping("/housing")
@Api(value = "住房统计")
public class HousingMapController {
    @Resource
    private HousingMapService housingMapService;
    /**
     * 统计住房
     * @param condition
     * @return
     */
    @PostMapping(path = {"/statistics"})
    @ApiOperation(value = "统计住房", httpMethod = "POST", notes = "{'community':'1','plotId':'1'}")
    public ResponseResult statistics(@RequestBody Condition condition){
        return housingMapService.statistics(condition);
    }
}
